<?php
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category   AW
 * @package    AW_Mobile
 * @copyright  Copyright (c) 2010-2011 aheadWorks Co. (http://www.aheadworks.com)
 * @license    http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
?>
<?php $_orders = $this->getOrders(); ?>
<div class="page-head"><h3><?php echo $this->__('My Orders') ?></h3></div>
<div class="in-page">
    <?php echo $this->getPagerHtml(); ?>
    <?php if($_orders->getSize()): ?>
    <table cellspacing="0" class="shopping-cart checkout-review" id="my-orders-table">
        <thead>
            <tr>
                <th><?php echo $this->__('Order #') ?></th>
                <th><?php echo $this->__('Date') ?></th>
                <th><?php echo $this->__('Total') ?></th>
                <th><?php echo $this->__('Status') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php $_odd = ''; ?>
            <?php foreach ($_orders as $_order): ?>
                <tr>
                    <td><a href="<?php echo $this->getViewUrl($_order) ?>"><?php echo $_order->getRealOrderId() ?></a></td>
                    <td><?php echo $this->formatDate($_order->getCreatedAtStoreDate()) ?></td>
                    <td><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></td>
                    <td><em><?php echo $_order->getStatusLabel() ?></em></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
    <script type="text/javascript">decorateTable('my-orders-table')</script>
    <?php echo $this->getPagerHtml(); ?>
    <?php else: ?>
        <p><?php echo $this->__('You have placed no orders.'); ?></p>
    <?php endif ?>
</div>
